home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
PROGRAMM
/
DB_CLIPP
/
0769A.ZIP
/
README.1ST
< prev
next >
Wrap
Text File
|
1987-11-11
|
2KB
|
52 lines
SUBSTRM - This small package contains 2 C functions for Clipper, that can
be used with memo fields. They are LINES and SUBSTRMEMO. LINES,
counts up the number of lines in a memo field. It is fairly
trivial and will be replaced with an interal function in the '87
version of Clipper. I included it because the demo program calls
it. Also, those with Autumn'86 may find it useful.
The second function is called SUBSTRMEMO. It is to memo fields,
what SUBSTR is to character fields. It allows you to extract a
range of lines from a memo field. The syntax is like this
SUBSTRMEMO (memo field [, start line [, end line]]). The start
and end lines are optional, but the presents of end line implies
that start line has been specified.
Why would you want to use this? My main reason for writing this
was to print a memo field that spanned 2 pages. By checking to see
how many lines remain on the page, I can print that many lines,
eject, and finish on the next page.
A word of caution: Although I made a diligent attemp to debug this
function, I did not try it with negative numbers. If you should
attemp to call it with negative numbers, I can't guarantee what
will happen. My suggestion is to not call it with negative numbers,
or modify the source code.
To Run the Demo:
All you have to do is link the object modules together.
DOS Linker or BORLAND TLINK:
LINK TEST SUBSTRM LINES,,nul,clipper
PLINK86:
I don't remember, I don't user it often
The file TESTFILE.DBF/.DBT contains 1 record. There is one
memo field in the record. The demo program TEST calls SUBSTRMEMO
and uses that file. It is included only for demonstration
purposes.
Any questions or comments can be directed to me through the Source: NA2541
Enjoy!!